package org.gd.hellojavacore.tests;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

/**
 * @author Gorhover
 * @version 1.0-SNAPSHOT
 * @since 2013-09-09 16:30
 */
public class StringTokenizerTest {

    public static void main(String[] args) {
        String value = "a1 a2 a3";
        StringTokenizer stringTokenizer = new StringTokenizer(value, " ");
        List<String> acquiringGroups = new ArrayList<>();
        while (stringTokenizer.hasMoreElements()) {
            acquiringGroups.add(stringTokenizer.nextToken());
        }
        System.out.println(acquiringGroups);
    }
}
